<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" th:with="title='督办',active='supervise'">
<header th:replace="comm/header::headerFragment(${title},${active})"></header>
<link th:href="@{/admin/plugins/tagsinput/jquery.tagsinput.css}" rel="stylesheet"/>
<link th:href="@{/admin/plugins/select2.dist.css/select2-bootstrap.css}" rel="stylesheet"/>
<link th:href="@{/admin/plugins/toggles/toggles.css}" rel="stylesheet"/>
<link th:href="@{/admin/plugins/md/css/style.css}" rel="stylesheet"/>
<link th:href="@{/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css}" rel="stylesheet"/>
<link rel="stylesheet" th:href="@{/plugins/kkpager/kkpager_blue.css}">
<link rel="stylesheet" th:href="@{/plugins/kkpager/kkpager_blue2.css}">
<link th:href="@{/plugins/nice-validator-0.8.1/jquery.validator.css}" rel="stylesheet"/>
<link th:href="@{/plugins/imgageView/imagePlusview.css}" rel="stylesheet"/>
<style>
    #tags_tagsinput {
        background-color: #fafafa;
        border: 1px solid #eeeeee;
    }

    #tags_addTag input {
        width: 100%;
    }

    #tags_addTag {
        margin-top: -5px;
    }
    
     #dropzone {
        margin-bottom: 3rem;
    }

    .dropzone {
        border: 2px dashed #0087F7;
        border-radius: 5px;
        background: white;
    }

    .dropzone .dz-message {
        font-weight: 400;
    }

    .dropzone .dz-message .note {
        font-size: 0.8em;
        font-weight: 200;
        display: block;
        margin-top: 1.4rem;
    }

    .attach-img {
        width: 100px;
        height: 100px;
        border-radius: 10px;
        box-shadow: 0px 0px 8px #333;
    }

    .attach-text {
        font-size: 12px;
        font-weight: 300;
    }

    .attach-img:hover {
        background-color: #f9f9f9;
    }
    .n-invalid {border:1px solid #c00;}
    
    
#localResizeIMGView div{
	width:100%;
	height:100%;
	position:relative;
}
#localResizeIMGView div s{
	width:25px;
	height:25px;
	background-color:#F60;
	border: 0px none;
	border-radius: 5px;
	position:absolute;
	float:right;
	top:0px;
	right:0px;
	display:block;
    
</style>

<body >
<input id="id" th:value="${id}" style="display: none;">
<div id="wrapper">
    <div th:replace="comm/header::header-body"></div>
    <div class="content-page">
        <div class="content" >
        <ul id="myTab" class="nav nav-tabs">
	<li class="active">
		<a href="#home" data-toggle="tab">
			详情
		</a>
	</li>
	<li><a href="#schedule" data-toggle="tab" onclick="geScheduleList()" >进展</a></li>
	<li><a href="#discuss" data-toggle="tab"  onclick="getDiscussList()"  >交流</a></li>
</ul>
            <div   class="tab-content" >
        <div class="tab-pane fade in active" id="home">
<!--             <h4 class="page-title"><a href="/supervise/business/list"> 督办</a>->详情</h4> -->
                <div class="row">
                    <div class="col-md-8">
                                <form class="form-horizontal" role="form" id="global-form" >
                                 <input th:value="${id}" style="display: none;" name="id">
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">督办标题</label>
                                        <div class="col-md-6">
                                              <span id ="title"  class="form-control" ></span>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">紧急程度</label>
                                        <div class="col-md-6">
                                          <span id ="urgencyDegreeName"  class="form-control" ></span>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                     <label class="col-sm-2 control-label">附件</label>
                                    <div class="col-md-6">
                                          <div  class="plusview" >
                                    <ul id="dropzone">
                                    
                                    </ul>
                                    </div>
                                     </div>
                                    </div>
                                    <div class="form-group">
                                    <label class="col-sm-2 control-label">指派给</label>
                                        <div class="col-md-8" id="userList">
                                   
									    </div>
                                   </div>
                                   <div class="form-group">
                                        <label class="col-sm-2 control-label">工作要求</label>
                                        <div class="col-md-6">
                                            <span class="form-control"  id="remark"></span>
                                        </div>
                                   </div>
                            <div class="clearfix"></div>
                            <div class="text-center">
                                <a  th:href="@{/supervise/business/list}" class="btn btn-primary waves-effect waves-light" >
                                   	 	返回列表
                                </a>
                                 <a  th:href="@{/supervise/business/edit/{id}(id=${id})}" class="btn btn-primary waves-effect waves-light" >
                                   	 	编辑
                                </a>
                            </div>
                        </form>
                    </div>
                </div>
                </div>
                <div class="tab-pane fade"  id="schedule" >
                <div class="row">
               <div class="col-md-12">
               <div class="text-right">
                                <button  onclick="addSchedule()" class="btn btn-primary waves-effect waves-light" >
                                   	 	添加进度
                                </button>
                            </div>
                            <p>
                        <table class="table table-striped table-bordered" >
                            <thead>
                            <tr>
                                <th class="text-center" width="10%">汇报人</th>
                                <th class="text-center" width="10%">完成进度</th>
                                <th class="text-center" width="50%">汇报内容</th>
                                <th class="text-center" width="15%">汇报时间</th>
                                <th class="text-center" width="10">操作</th>
                            </tr>
                            </thead>
                            <tbody id="schedule_result">

                            </tbody>
                        </table>
                        <div id="kkpager"></div>
                </div>
                 </div>
                </div>
		                <div class="tab-pane fade" id="discuss">
						<div class="row">
		               	<div class="col-md-12">
		               	<div class="text-right">
                            <button  onclick="addDiscuss()" class="btn btn-primary waves-effect waves-light" >
                               	 	发消息
                            </button>
                            </div>
                            <p>
                        <table class="table table-striped table-bordered">
                            <thead>
                            <tr>
                                <th class="text-center" width="10%">发送人</th>
                                <th class="text-center" width="10%">发送对象</th>
                                <th class="text-center" width="60%">消息内容</th>
                                <th class="text-center" width="15%">发送时间</th>
<!--                                 <th class="text-center" width="5">操作</th> -->
                            </tr>
                            </thead>
                            <tbody id="discuss_result">

                            </tbody>
                        </table>
                        <div id="kkpager2"></div>
                </div>
                </div>
                </div>
                <div th:replace="comm/footer :: footer-content"></div>
            </div>
        </div>
    </div>
</div>
<div th:replace="comm/footer :: footer"></div>

<div class="modal fade" id="scheduleModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h5 class="modal-title" id="myModalLabel">
					汇报进展
					<br>
				</h5>
			</div>
			<div class="modal-body">
			<div class="row">
                    <div class="col-md-12">
                                <form class="form-horizontal" role="form" id="schedule_form" >
                                <input id="schedule_id" value="" name="id" style="display: none;">
                                <input th:value="${id}" name="supervisionId" style="display: none;">
                                 <div class="form-group">
                                    <label class="col-sm-2 control-label">汇报人</label>
                                        <div class="col-md-10">
                                       <div class="col-sm-4" >
                                        <select class="form-control" id="dept_select" name="deptId"   onchange="getUserList(this.value,null)">
                                        </select>
                                        </div>
                                      <div class="col-sm-4">
                                         <select class="form-control" id="user_select" name="userId">
                                        </select>
                                        </div>
									    </div>
                                   </div>
                                   <div class="form-group">
                                    <label class="col-sm-2 control-label">汇报时间</label>
                                        <div class="col-md-6">
                                         <input type="text" class="form-control  datetimepicker" id="time" name="time" placeholder="汇报时间"/>
									    </div>
                                   </div>
                                   <div class="form-group">
                                    <label class="col-sm-2 control-label">汇报进度%</label>
                                        <div class="col-xs-4">
                                         <input type="text" class="form-control" name="schedule" id="schedule_num" placeholder="汇报进度%"/>
									    </div>
                                   </div>
                                    <div class="form-group">
                                    <label class="col-sm-2 control-label">汇报内容</label>
                                        <div class="col-xs-8">
                                         <textarea class="form-control" rows="3" name="content" id = "content" placeholder="200字以内" ></textarea>
									    </div>
                                   </div>
                                   <div class="modal-footer">
                                   <button type="submit" class="btn btn-primary" onclick="save_schedule()">
										提交
									</button>
									<button type="button" class="btn btn-default" data-dismiss="modal">取消
									</button>
								</div>
                                </form>
			</div>
			</div>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>

<div class="modal fade" id="discussModal" tabindex="-1" role="dialog" aria-labelledby="discussModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h5 class="modal-title" id="discussModalLabel">
					发消息
					<br>
				</h5>
			</div>
			<div class="modal-body">
			<div class="row">
                    <div class="col-md-12">
                                <form class="form-horizontal" role="form" id="discuss_form" >
                                <input th:value="${id}" name="permissionId" style="display: none;">
                                 <div class="form-group">
                                    <label class="col-sm-2 control-label">发送对象</label>
                                      <div class="col-xs-4">
                                         <select class="form-control" id="discuss_user_select" name="toUserId">
                                        </select>
                                        </div>
                                   </div>
                                    <div class="form-group">
                                    <label class="col-sm-2 control-label">消息内容</label>
                                        <div class="col-xs-8">
                                         <textarea class="form-control" rows="3" name="content" id = "discuss_content" placeholder="200字以内" ></textarea>
									    </div>
                                   </div>
                                   <div class="modal-footer">
                                   <button type="submit" class="btn btn-primary" onclick="save_discuss()">
										提交
									</button>
									<button type="button" class="btn btn-default" data-dismiss="modal">取消
									</button>
								</div>
                                </form>
			</div>
			</div>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>
<script th:src="@{/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js}"></script>       
<script th:src="@{/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.zh-CN.js}"></script>  
<script type="text/javascript">
$(function() {
    $('.demo-cancel-click').click(function(){return false;});
     var uls = $('.sidebar-nav > ul > *').clone();
     uls.addClass('visible-xs');
     
     $('.datetimepicker').datetimepicker({
         format: 'yyyy-mm-dd hh:ii', 
         minView: "0", //选择日期后，不会再跳转去选择时分秒 
         language: 'zh-CN',
         autoclose: true,
     }).on('change',function(){
	 		$(this).attr("class","form-control");
	 		$(this).siblings('span').html('');
		});
});
</script>
<script th:src="@{/admin/plugins/tagsinput/jquery.tagsinput.min.js}"></script>
<!-- editor.md -->
<script th:src="@{/plugins/nice-validator-0.8.1/jquery.validator.js}"></script>
<script th:src="@{/plugins/nice-validator-0.8.1/zh-CN.js}"></script>
<script th:src="@{//cdn.bootcss.com/jquery-toggles/2.0.4/toggles.min.js}"></script>
<script th:src="@{/plugins/jQuery-ext/serializeObject.js}"></script>
<script th:src="@{/plugins/kkpager/kkpager.min.js}"></script>
<script th:src="@{/plugins/kkpager/kkpager2.js}"></script>
<script th:src="@{/plugins/imgageView/imagePlusview.js}"></script>
<script th:src="@{/js/supervise/business/detail.js}"></script>
<script th:src="@{/js/supervise/business/schedule.js}"></script>
<script th:src="@{/js/supervise/business/discuss.js}"></script>
</body>
</html>